#!/usr/bin/env python3.10
# -*- encoding: utf-8 -*-
'''
@File    :   mixins.py
@Time    :   2024/02/20 16:46:05
@Author  :   windstarry 
@Version :   1.0
'''
# here put the import lib

from typing import Any
from django.db.models import QuerySet

from .models import QuestionCategory,QuestionType,QuestionLevel


class QuestionCategoryMixin:
    request: Any
    
    def get_queryset(self) -> QuerySet:
        """
        获取查询集。
        :return: QuestionCategory的查询集
        """
        return QuestionCategory.objects.all()
    
    
class QuestionTypeMixin:
    request: Any
    
    def get_queryset(self) -> QuerySet:
        """
        获取查询集。
        :return: QuestionType的查询集
        """
        return QuestionType.objects.all()
    
    
class  QuestionLevelMixin:
    request: Any
    def get_queryset(self) -> QuerySet:
        """
        获取查询集。
        :return: QuestionLevel的查询集
        """
        return QuestionLevel.objects.all()
    
    
